package com.syc.activiti;

import java.util.Map;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;

/**
 * 使用ProcessEngines的destroy方法
 * @author yangenxiong
 *
 */
public class Destroy {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//进行初始化并且返回默认的ProcessEngine实例
		ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();
		Map<String, ProcessEngine> engines = ProcessEngines.getProcessEngines();
		System.out.println("调用destroy方法前引擎数量：" + engines.size());
		//调用销毁方法
		ProcessEngines.destroy();
		engines = ProcessEngines.getProcessEngines();
		//最终结果为0
		System.out.println("调用destroy方法后引擎数量：" + engines.size());
	}

}
